import Vue from 'vue'
import Router from 'vue-router'
import { LoadingPlugin } from 'vux'
import { ToastPlugin } from 'vux'
Vue.use(ToastPlugin)
Vue.use(LoadingPlugin)
Vue.use(Router)

const transactInfo = () => import('@/pages/transact/transactInfo')
const queryResults = () => import('@/pages/archives/queryResults')
const InformationService = () => import('@/pages/customer/InformationService')
const contractInformation = () => import('@/pages/contractInformation/index')
const contactInformation = () => import('@/pages/contactInformation/index')
const contactMaintain = () => import('@/pages/contactMaintain/index')
const contractMaintain = () => import('@/pages/contractMaintain/index')
const ticketOpen = () => import('@/pages/ticketOpen/index')
const ticketMaintain = () => import('@/pages/ticketMaintain/index')
const facilitiesSearch = () => import('@/pages/facilitiesSearch/index')
const facilitiesMaintain = () => import('@/pages/facilitiesMaintain/index')
const equipmentSearch = () => import('@/pages/equipmentSearch/index')
const equipmentMaintain = () => import('@/pages/equipmentMaintain/index')
const consumptionSearch = () => import('@/pages/consumptionSearch/index')
const paySearch = () => import('@/pages/paySearch/index')
const inspection = () => import('@/pages/inspection/index')
const verification = () => import('@/pages/verification/index')
const maintenance = () => import('@/pages/maintenance/index')
const routes = [{
  path: '/transactInfo',
  name: transactInfo,
  component: transactInfo
},
{
  // 查询信息
  path: '/',
  name: InformationService,
  component: InformationService
},
{
  // 查询信息结果
  path: '/archives',
  name: queryResults,
  component: queryResults
},
{
  // 联系信息-展示
  path: '/contactInformation',
  name: contactInformation,
  component: contactInformation
},
{
  // 联系信息-维护
  path: '/contactMaintain',
  name: contactMaintain,
  component: contactMaintain
},
{
  // 合同信息-展示
  path: '/contractInformation',
  name: contractInformation,
  component: contractInformation
},
{
  // 合同信息-维护
  path: '/contractMaintain',
  name: contractMaintain,
  component: contractMaintain
},
{
  // 开票信息-查询
  path: '/ticketOpen',
  name: ticketOpen,
  component: ticketOpen
},
{
  // 开票信息-维护
  path: '/ticketMaintain',
  name: ticketMaintain,
  component: ticketMaintain
},
{
  // 管线设施-查询
  path: '/facilitiesSearch',
  name: facilitiesSearch,
  component: facilitiesSearch
},
{
  // 管线设施-维护
  path: '/facilitiesMaintain',
  name: facilitiesMaintain,
  component: facilitiesMaintain
},
{
  // 用气设备-查询
  path: '/equipmentSearch',
  name: equipmentSearch,
  component: equipmentSearch
},
{
  // 用气设备-维护
  path: '/equipmentMaintain',
  name: equipmentMaintain,
  component: equipmentMaintain
},
{
  // 用量信息查询
  path: '/consumptionSearch',
  name: consumptionSearch,
  component: consumptionSearch
},
{
  // 缴费信息查询
  path: '/paySearch',
  name: paySearch,
  component: paySearch
},
{
  // 巡检录入
  path: '/inspection',
  name: inspection,
  component: inspection
},
{
  // 检定录入
  path: '/verification',
  name: verification,
  component: verification
},
{
  // 保养录入
  path: '/maintenance',
  name: maintenance,
  component: maintenance
},]

var router = new Router({
  routes
})

export default router;